<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台（PHP版）
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码，建议反馈是我们前进的动力
// | 开源版本可自由商用，可去除界面版权logo
// | gitee下载：https://gitee.com/likeshop_gitee/likeadmin
// | github下载：https://github.com/likeshop-github/likeadmin
// | 访问官网：https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------

namespace app\adminapi\validate\promotion;


use app\common\validate\BaseValidate;


/**
 * PromotionLink验证器
 * Class PromotionLinkValidate
 * @package app\adminapi\validate
 */
class PromotionLinkValidate extends BaseValidate
{

    /**
     * 设置校验规则
     * @var string[]
     */
    protected $rule = [
        'id'                   => 'require',
        'app_id'               => 'require',
        'name'                 => 'require',
        'k_coin'               => 'require',
        'recharge_template_id' => 'require',
        'skits_id'             => 'require',
        'skits_name'           => 'require',
        'episodes_id'          => 'require',
        'episodes_name'        => 'require',
        'media_id'             => 'require',
        'audit_mode'           => 'require',
        'media_feedback'       => 'require',
    ];


    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'id'                   => 'id',
        'app_id'               => '应用ID',
        'name'                 => '推广链名称',
        'k_coin'               => 'K币',
        'recharge_template_id' => '充值模板ID',
        'skits_id'             => '短剧ID',
        'skits_name'           => '短剧名称',
        'episodes_id'          => '剧集ID',
        'episodes_name'        => '剧集名称',
        'media_id'             => '媒体',
        'audit_mode'           => '审核模式 1开启 0关闭',
        'media_feedback'       => '媒体回传 1开启 0关闭',
    ];


    /**
     * @notes 添加场景
     * @return PromotionLinkValidate
     * @author likeadmin
     * @date 2024/03/04 19:26
     */
    public function sceneAdd()
    {
        return $this->only(['app_id', 'name', 'k_coin', 'recharge_template_id', 'skits_id', 'skits_name', 'episodes_id', 'episodes_name', 'media_id', 'audit_mode', 'media_feedback']);
    }


    /**
     * @notes 编辑场景
     * @return PromotionLinkValidate
     * @author likeadmin
     * @date 2024/03/04 19:26
     */
    public function sceneEdit()
    {
        return $this->only(['id', 'k_coin', 'recharge_template_id', 'audit_mode']);
    }


    /**
     * @notes 删除场景
     * @return PromotionLinkValidate
     * @author likeadmin
     * @date 2024/03/04 19:26
     */
    public function sceneDelete()
    {
        return $this->only(['id']);
    }


    /**
     * @notes 详情场景
     * @return PromotionLinkValidate
     * @author likeadmin
     * @date 2024/03/04 19:26
     */
    public function sceneDetail()
    {
        return $this->only(['id']);
    }

}
